package com.azusa.ktc_base.dao;

import com.azusa.ktc_base.entity.Label;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface LabelDao extends JpaRepository<Label,String>, JpaSpecificationExecutor<Label> {

    @Query("from Label where recommend=?1")
    List<Label> findByRecommend(String recommend);

    @Query("from Label where state=?1")
    List<Label> findByState(String state);
}
